/**
 * @desc
 *
 * @使用场景
 *
 * @author  杨晓东[of1081]
 * @company qianmi.com
 * @Date    16/12/13
 **/
'use strict';


let inquirer = require('inquirer');

let questions = [{
  type:'list',
  name:'selection',
  message:'请选择环境------------>',
  choices:[{name:'dev'},{name:'test'},{name:'prod'},{name:'gray'}]
}];


 module.exports=()=>{
   return new Promise((resolve,reject)=>{
     inquirer.prompt(questions).then((answers)=>{
       let envCode = answers.selection;
       console.log('用户选择环境编码envCode:',envCode);
       resolve({envCode});
     },(err)=>{
       reject(err);
     })
   })
 };

